<template>
  <el-dialog
    custom-class="dialogStyle expectDialog"
    :append-to-body="true"
    :visible.sync="visible"
    width="360px"
    style="margin-top: 30vh !important"
  >
    <div
      class="expectBox"
      :style="{ height: type === 'expect' ? '200px' : '230px' }"
    >
      <template v-if="type === 'expect'">
        <img :src="require('@/assets/portal/img-expect.png')" alt="" />
        <p>{{ text + "~ ~" }}</p>
      </template>
      <template v-else>
        <img :src="require('@/assets/portal/img-noauth.png')" alt="" />
        <div class="textStyle">{{ text }}</div>
      </template>
    </div>
  </el-dialog>
</template>
<script>
export default {
  name: "expect",
  props: {
    text: {
      type: String,
      default: "功能开发中，敬请期待",
    },
    type: {
      type: String,
      default: "expect",
    },
  },
  data() {
    return {
      visible: false,
    };
  },
  methods: {
    open() {
      this.visible = true;
    },
  },
};
</script>
<style lang="scss">
.expectDialog {
  .el-dialog__header {
    padding: 30px 20px 0 !important;
  }
  .expectBox {
    text-align: center;
    position: relative;
    height: 200px;
    img {
      width: 230px;
      height: 176px;
    }
    p {
      margin: 0;
      width: 100%;
      font-size: 16px;
      color: #222222;
      position: absolute;
      bottom: 30px;
      left: 50%;
      transform: translateX(-50%);
    }
    .textStyle {
      font-size: 16px;
      color: #222222;
      white-space: pre-wrap;
      margin: 0;
      width: 100%;
      font-size: 16px;
      color: #222222;
      position: absolute;
      bottom: 30px;
      left: 50%;
      line-height: 25px;
      transform: translateX(-50%);
    }
  }
}
</style>
